package com.zzyl.controller.customer;

import com.zzyl.base.ResponseResult;
import com.zzyl.controller.BaseController;
import com.zzyl.dto.UserLoginRequestDto;
import com.zzyl.service.CustomerUserService;
import com.zzyl.vo.LoginVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/customer/user")
@Slf4j

public class CustomerUserController extends BaseController {
    @Autowired
    private CustomerUserService customerUserService;
    @PostMapping("/login")
    public ResponseResult<LoginVo>customerLogin(@RequestBody UserLoginRequestDto userLoginRequestDto){
    LoginVo loginVo =customerUserService.customerLogin(userLoginRequestDto);
        return success(loginVo);
    }
}
